#include <iostream>
using namespace std;

class Target{
    // 目标抽象类
    public:
    virtual void Request(){
        cout << "Target::Request..."<< endl;
    }
    virtual ~Target() { }
};

class Adaptee{
    // 适配者类
    public:
    void SpecificRequest(){
        cout << "Adaptee::SpecificRequest..." << endl;
    }
};

class Adapter: public Target,private Adaptee{
    // 适配器类
    public:
    Adapter(Adaptee * ade){
        _ade = ade;
    }
    void Request(){
        _ade->SpecificRequest();
    }
    private:
    Adaptee *_ade;
};

int main(){
    Adaptee *ade = new Adaptee();
    Target *adr = new Adapter(ade); //包装适配者对象ade
    adr->Request();
    delete ade;
    delete adr;
    return 0;
}
